#define _CRT_SECURE_NO_WARNINGS
#include<stdio.h>

int main()
{
    int arr[10] = { 0 };
    scanf("%d %d %d %d %d %d %d %d %d %d", &arr[0], &arr[1], &arr[2], &arr[3], &arr[4], &arr[5], &arr[6], &arr[7], &arr[8], &arr[9]);
    int num[50] = { 0 };
    int count = 0;
    for (int i = 0; i < 10; i++)
    {
        
        if (arr[i] != 0)
        {
            while (arr[i] > 0)
            {
                num[count] = i;
                arr[i]--;
                count++;
            }
        }
    }
    for (int i = 0; i < count; i++)
    {
        if (num[0] == 0 && num[i + 1] != 0)
        {
            int tmp = num[i + 1];
            num[i + 1] = num[0];
            num[0] = tmp;
            break;
        }
    }
    for (int i = 0; i < count; i++)
    {
        printf("%d", num[i]);
    }
    printf("\n");
    return 0;
}